<template>
  <transition name="center-fade">
    <div v-if="modelValue" class="center-dialog-mask" @click.self="$emit('update:modelValue', false)">
      <div class="center-dialog-content">
        <slot />
      </div>
    </div>
  </transition>
</template>

<script setup>
const props = defineProps({
  modelValue: Boolean
})
const emit = defineEmits(['update:modelValue'])
</script>

<style scoped>
.center-dialog-mask {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.18);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.center-dialog-content {
  min-width: 320px;
  max-width: 90vw;
  min-height: 120px;
  background: linear-gradient(135deg, #f5f7fa 60%, #e0ecff 100%);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px 40px 32px;
  font-size: 2.2rem;
  color: #222;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px #e0eaff;
  text-align: center;
  position: relative;
}
.center-fade-enter-active, .center-fade-leave-active {
  transition: opacity 0.25s cubic-bezier(.4,0,.2,1), transform 0.25s cubic-bezier(.4,0,.2,1);
}
.center-fade-enter-from, .center-fade-leave-to {
  opacity: 0;
  transform: scale(0.95);
}
.center-fade-enter-to, .center-fade-leave-from {
  opacity: 1;
  transform: scale(1);
}
</style> 